<%@ page import="studentinformationmanagementsystem.entity.Student" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="studentinformationmanagementsystem.entity.Classandgrade" %>
<%@ page import="studentinformationmanagementsystem.entity.Teacher" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>

    <%
        //获取学生信息
        Student studentlogin = (Student)request.getSession().getAttribute("Studentlogin");

       //获取班级信息
        ArrayList page1 = (ArrayList)request.getAttribute("page");
    %>

	学生信息管理平台
</title><link href="../student/function/style/StudentStyle.css" rel="stylesheet" type="text/css" />
    <link href="../student/function/script/jBox/Skins/Blue/jbox.css" rel="stylesheet" type="text/css" />
    <link href="../student/function/style/ks.css" rel="stylesheet" type="text/css" />
    <script src="../student/function/script/jBox/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="../student/function/script/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="../student/function/script/jBox/i18n/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <script src="../student/function/script/Common.js" type="text/javascript"></script>
    <script src="../student/function/script/Data.js" type="text/javascript"></script>
    <script type="text/javascript">
        $().ready(function () {
            setStudMsgHeadTabCheck();
            showUnreadSysMsgCount();
        });

        //我的信息头部选项卡
        function setStudMsgHeadTabCheck() {
            var currentUrl = window.location.href;
            currentUrl = currentUrl.toLowerCase();
            var asmhm = "";
            $("#ulStudMsgHeadTab li").each(function () {
                asmhm = $(this).find('a').attr("href").toLowerCase();
                if (currentUrl.indexOf(asmhm) > 0) {
                    $(this).find('a').attr("class", "tab1");
                    return;
                }
            });
        }

        //显示未读系统信息
        function showUnreadSysMsgCount() {
            var unreadSysMsgCount = "0";
            if (Number(unreadSysMsgCount) > 0) {
                $("#unreadSysMsgCount").html("(" + unreadSysMsgCount + ")");
            }
        }

        //退出
        function loginOut() {
            if (confirm("确定退出吗？")) {
                StudentLogin.loginOut(function (data) {
                    if (data == "true") {
                        window.location = "/Login.aspx";
                    }
                    else {
                        jBox.alert("退出失败！", "提示", new { buttons: { "确定": true} });
                    }
                });
            }
        }
        //更改报考类别
        function changeCateory(thisObj, id) {
            var oldCateoryId = $("#cateoryId").val();
            var cateoryId = "";
            if (id != null) {
                cateoryId = id;
            }
            else {
                cateoryId = thisObj.val();
            }
            var studentId = $("#studentId").val();
            if (cateoryId.length &lt;= 0) {
                jBox.tip("报考类别不能为空！");
                if (id == null) {
                    thisObj.val(oldCateoryId);
                }
            }
            else {
                studentInfo.changeStudentCateory(cateoryId, function (data) {
                    var result = $.parseJSON(data);
                    if ((String(result.ok) == "true")) {
                        window.location.href = "/Index.aspx";
                    }
                    else {
                        jBox.tip(result.message);
                    }
                });
            }
        }
    </script>
    
    <script type="text/javascript">
        //学生投诉异议
        function onSaveProblem() {
            var studentId = $("#studentId").val();
            var workAssess = $('input[name="workAssess"]:checked').val();
            var problemContent = $("#problemContent").val();
            var problemType = $('input[name="problemType"]:checked').val();
            var problemTypeStr = "学生";
            switch (problemType) { 
                case "4": problemTypeStr+="提问"; break;
                case "3": problemTypeStr += "意见"; break;
                case "1": problemTypeStr += "投诉"; break;
                default: break;
            }

            if (problemContent.length &lt;= 0) {
                jBox.tip("请填写问题反馈的内容！");
                return false;
            }
            else {
                problemContent = "工作评价：" + workAssess + "，" + problemContent;
                StudentCompain.insertCompain(studentId, problemTypeStr, problemType, problemContent, function (data) {
                    var obj = $.parseJSON(data);
                    if (obj.ok == true) {
                        jBox.alert(obj.message, "提示");
                        setTimeout(function () {
                            window.location.reload();
                        }, 1500);
                    }
                    else {
                        jBox.tip(obj.message);
                    }
                });
            }
        }
    </script>
</head>
<body>


<div class="banner">
    <div class="bgh">
        <div class="page">
            <div id="logo">
                <a href="../student/function/Index.aspx.jsp">
                    <img src="../student/function/images/Student/logo.gif" alt="" width="165" height="48" />
                </a>
            </div>
            <div class="topxx">
                <%=studentlogin.getStudentid()%>学员：<%=studentlogin.getStudentname()%>，欢迎您!
                <a href="../student/function/Index.aspx.jsp">我的信息</a>
                <a href="../student/function/user/studentinfor/SystemMsge.aspx.jsp">通知</a>
                <a href="../student/function/user/account/ChangePasswd.aspx.jsp">密码修改</a>
                <a href="../student1/login.do?action=NoStudenLogin">安全退出</a>
            </div>
            <div class="blog_nav">
                <ul>
                    <li><a href="../student/function/myinfo/Index.aspx.jsp">我的信息</a></li>
                    <li><a href="../student/function/educationcenter/Score.aspx.jsp">教务中心</a></li>
                    <li><a href="../student/function/myaccount/wdcw.aspx.jsp">我的学费</a></li>
                    <li><a href="../student/function/onlineteaching/StudentMaterial.aspx.jsp">资料中心</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>

    <div class="page">
        <div class="box mtop">
            <div class="leftbox">
                <div class="l_nav2">
                    <div class="ta1">
                        <strong>个人中心</strong>
                        <div class="leftbgbt">
                        </div>
                    </div>
                    <div class="cdlist">
                        <div>
                            <a href="../student/function/myinfo/Index.aspx.jsp">我的信息</a></div>
                        <div>
                            <a href="../student1/StudentServlet.do?action=studenClass">班级信息 </a>
                        </div>
<!--                        <div>-->
<!--                            <a href="../user/StudentInfor/Letter.aspx.html">短信息</a></div>-->
                        <div>
                            <a href="../student/function/user/studentinfor/SystemMsge.aspx.jsp">学院通知</a></div>
<!--                        <div>-->
<!--                            <a href="Objection.aspx.jsp">我的异议</a></div>-->
                    </div>
                    <div class="ta1">
                        <strong>教务中心</strong>
                        <div class="leftbgbt2">
                        </div>
                    </div>
                    <div class="cdlist">
                        <div>
                            <a href="../student/function/educationcenter/Application.aspx.jsp">选课</a></div>
                        <div>
                            <a href="../student/function/educationcenter/Book.aspx.jsp">我的选课</a></div>
                        <div>
                            <a href="../student/function/educationcenter/Score.aspx.jsp">我的成绩</a></div>
                    </div>
                    <div class="ta1">
                        <strong>学习中心</strong>
                        <div class="leftbgbt2"></div>
                    </div>
                    <div class="cdlist">
                        <div>
                            <a href="../student/function/onlineteaching/StudentMaterial.aspx.jsp">资料下载</a></div>
                        <div>
                            <a href="../student/function/onlineteaching/StudentStudyRecordList.aspx.jsp">学习历程</a></div>
                    </div>
                   
                    <div class="ta1">
                        <strong>财务中心</strong><div class="leftbgbt2">
                        </div>
                    </div>
                    <div class="cdlist">
                        <div>
                            <a href="../student/function/myaccount/wdcw.aspx.jsp">我的财务</a></div>
                    </div>

                        <div class="ta1">
                              <strong>教学系统</strong>
                        <div class="leftbgbt2">
                        </div>
                    </div>
                </div>
            </div>
            <div class="rightbox">


<h2 class="mbx">我的信息 &gt; 班级信息&nbsp;&nbsp</h2>
<div class="morebt">
    

<ul id="ulStudMsgHeadTab">
    <li><a class="tab2" onclick="" href="../student/function/myinfo/Index.aspx.jsp">个人资料</a> </li>
    <li><a class="tab2" onclick="" href="../student1/StudentServlet.do?action=studenClass">班级信息</a></li>
<!--    <li><a class="tab2" onclick="" href="../user/StudentInfor/Letter.aspx.html">短信息</a></li>-->
    <li><a class="tab2" onclick="" href="../student/function/user/studentinfor/SystemMsge.aspx.jsp">通知<span style="color:#ff0000; padding-left:5px;" id="unreadSysMsgCount"></span></a></li>
<!--    <li><a class="tab2" onclick="" href="Objection.aspx.jsp">我的异议</a></li>-->
</ul>
    <%-- 展示班级信息的--%>
        <%
            //如果获取的班级信息的list为空则调用查询班级信息方法
        if (page1==null || page1.size()==0){
         %>
    <script>
        location.href="../../../student1/StudentServlet.do?action=studenClass"
    </script>
    <%
            //不为空就将list中的对象取出并且赋值
        }else {
            Classandgrade classandgrade = (Classandgrade)page1.get(0);
            Teacher teacher = (Teacher)page1.get(1);
        %>
 </div>
     <div class="cztable">
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
            <td width="91" align="right">班级名称：</td>
            <td colspan="5">  <%=classandgrade.getClassandgrade()%>  </td>
        </tr>
        <tr>
            <td align="right">班级QQ群：</td>
            <td colspan="5">  <%=classandgrade.getQqGroup()%>  </td>
        </tr>
        <tr>
            <td align="right">班级宣传语：</td>
            <td colspan="5">   <%=classandgrade.getBriefintroduction()%>   </td>
        </tr>
        <tr>
            <td align="right">学校名称：</td>
            <td colspan="5">武夷学院&nbsp;</td>
        </tr>
            <tr>
                    <td align="right"><div align="right">班主任老师：</div>&nbsp;</td>
                    <td><div align="left"></div>    <%=teacher.getTeachername()%>   </td>
                    <td><div align="right">电话：</div>&nbsp;</td>
                    <td><div align="left"></div>   <%=teacher.getPhone()%>   </td>
                  </tr>
        <%
            }
        %>



<!--        <tr>-->
<!--            <td align="right">工作评价：</td>-->
<!--            <td colspan="5">-->
<!--                <input value="满意" checked="checked" type="radio" name="workAssess" />满意-->
<!--                <input value="一般" type="radio" name="workAssess" />一般-->
<!--                <input value="差" type="radio" name="workAssess" />差-->
<!--            </td>-->
<!--        </tr>-->
<!--        <tr>-->
<!--            <td rowspan="3" align="right">问题反馈：</td>-->
<!--            <td colspan="5">-->
<!--                <input value="4" checked="checked" type="radio" name="problemType" />提问-->

<!--                <input value="1" type="radio" name="problemType" />投诉-->
<!--            </td>-->
<!--        </tr>-->
<!--        <tr>-->
<!--            <td colspan="5">-->
<!--                <textarea name="problemContent" id="problemContent" cols="80" rows="6" class="input_2"></textarea>-->
<!--            </td>-->
<!--        </tr>-->
<!--        <tr>-->
<!--            <td colspan="5" align="left" valign="middle">-->
<!--                <input type="button" name="button2" id="button2" value="点击提交" class="input2" onclick="onSaveProblem()" />-->
<!--            </td>-->
<!--        </tr>-->
    </table>
    </div>
            </div>
        </div>
    </div>

</body>
</html>
